module.exports = React.createClass({
	//数据可以ajax从服务端获取
	blockType:function(type){
		return{
			"service":{name:"项目预约",description:"腰酸背疼,对症下药",target:""},
			"massagist":{name:"推拿师直约",description:"每个老师的手法，都是独一无二的",target:""},
			"store":{name:"门店服务",description:"让健康常驻身边",target:"",important:"true"}
		}[type]
	},
	getInitialState: function() {
		return  this.blockType(this.props.type);
	},
	componentDidMount: function() {

	},
	
	render: function() {
		return(
			<div className="row" style={styles.itemBlock}>
				<span>
					<em style={styles.name}>{this.state.name}</em>
					<i style={this.state.important ? styles.important:{display:"none"}}>new</i>
					<br></br>
					<i style={styles.description}>{this.state.description}</i>
				</span>
				<i className="right fa fa-angle-right fa-2x" style={styles.arrow}></i>
			</div>
		)
	},
});
var styles = 
{
	itemBlock:{
		borderBottom:"1px solid grey"
	},
	name:{
		fontSize:"18px",
		marginLeft:"20px"
	},
	description:{
		fontSize:"10px",
		color:"grey",
		marginLeft:"24px"
	},
	arrow: {
		paddingRight:".5em",
		paddingTop:"5px"
	},
	important:{
		border:"1px solid red",
		color:"red",
		fontSize:"8px",
		borderRadius:"20%",
		marginLeft:"10px"
	}
}